# Copyright (C) 2015 The Bochs Project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA B 02110-1301 USA


.SUFFIXES: .cpp

srcdir = .

top_builddir    = ../..
top_srcdir      = ../..

SHELL = /bin/bash



CXX = g++
CXXFLAGS = -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -pthread  $(X_CFLAGS)

LDFLAGS = 
LIBS =  -ldl
RANLIB = ranlib

BX_INCDIRS = -I.. -I../.. -I$(srcdir)/.. -I$(srcdir)/../.. -I../../instrument/stubs -I$(srcdir)/../../instrument/stubs

CPUDB_OBJS = pentium.o \
             pentium_mmx.o \
             amd_k6_2_chomper.o  \
             p2_klamath.o \
             p3_katmai.o \
             p4_willamette.o \
             p4_prescott_celeron_336.o \
             athlon64_clawhammer.o \
             athlon64_venice.o \
             turion64_tyler.o \
             phenomx3_8650_toliman.o \
             core_duo_t2400_yonah.o \
             core2_penryn_t9600.o \
             atom_n270.o \
             corei5_lynnfield_750.o \
             corei5_arrandale_m520.o \
             corei7_sandy_bridge_2600K.o \
             corei7_ivy_bridge_3770K.o \
             corei7_haswell_4770.o \
             broadwell_ult.o \
             zambezi.o \
             trinity_apu.o

BX_INCLUDES = ../../bochs.h ../../config.h


all: libcpudb.a

.cpp.o:
	$(CXX) -c $(BX_INCDIRS) $(CXXFLAGS) $< -o $@


libcpudb.a: $(CPUDB_OBJS)
	rm -f  libcpudb.a
	ar rv $@ $(CPUDB_OBJS)
	$(RANLIB) libcpudb.a

$(CPUDB_OBJS): $(BX_INCLUDES)

clean:
	rm -f  *.o
	rm -f  *.a

dist-clean: clean
	rm -f  Makefile

###########################################
# dependencies generated by
#  gcc -MM -I.. -I../.. -I../../instrument/stubs *.cc | sed 's/\.cc/.cpp/g'
###########################################
amd_k6_2_chomper.o: amd_k6_2_chomper.cpp ../../bochs.h ../../config.h \
 ../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h amd_k6_2_chomper.h
athlon64_clawhammer.o: athlon64_clawhammer.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h athlon64_clawhammer.h \
 ../../cpu/cpuid.h
athlon64_venice.o: athlon64_venice.cpp ../../bochs.h ../../config.h \
 ../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h athlon64_venice.h ../../cpu/cpuid.h
atom_n270.o: atom_n270.cpp ../../bochs.h ../../config.h ../../osdep.h \
 ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h ../../param_names.h atom_n270.h \
 ../../cpu/cpuid.h
core2_penryn_t9600.o: core2_penryn_t9600.cpp ../../bochs.h ../../config.h \
 ../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h ../../param_names.h core2_penryn_t9600.h \
 ../../cpu/cpuid.h
core_duo_t2400_yonah.o: core_duo_t2400_yonah.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h ../../param_names.h \
 core_duo_t2400_yonah.h ../../cpu/cpuid.h
corei5_arrandale_m520.o: corei5_arrandale_m520.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h ../../param_names.h \
 corei5_arrandale_m520.h ../../cpu/cpuid.h
corei5_lynnfield_750.o: corei5_lynnfield_750.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h ../../param_names.h \
 corei5_lynnfield_750.h ../../cpu/cpuid.h
broadwell_ult.o: broadwell_ult.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h ../../param_names.h \
 broadwell_ult.h
corei7_haswell_4770.o: corei7_haswell_4770.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h ../../param_names.h \
 corei7_haswell_4770.h
corei7_ivy_bridge_3770K.o: corei7_ivy_bridge_3770K.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h ../../param_names.h \
 corei7_ivy_bridge_3770K.h
corei7_sandy_bridge_2600K.o: corei7_sandy_bridge_2600K.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h ../../param_names.h \
 corei7_sandy_bridge_2600K.h
p2_klamath.o: p2_klamath.cpp ../../bochs.h ../../config.h ../../osdep.h \
 ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h p2_klamath.h ../../cpu/cpuid.h
p3_katmai.o: p3_katmai.cpp ../../bochs.h ../../config.h ../../osdep.h \
 ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h p3_katmai.h ../../cpu/cpuid.h
p4_prescott_celeron_336.o: p4_prescott_celeron_336.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h p4_prescott_celeron_336.h \
 ../../cpu/cpuid.h
p4_willamette.o: p4_willamette.cpp ../../bochs.h ../../config.h \
 ../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h p4_willamette.h ../../cpu/cpuid.h
pentium.o: pentium.cpp ../../bochs.h ../../config.h ../../osdep.h \
 ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h pentium.h
pentium_mmx.o: pentium_mmx.cpp ../../bochs.h ../../config.h ../../osdep.h \
 ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h pentium_mmx.h
zambezi.o: zambezi.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h zambezi.h \
 ../../cpu/cpuid.h
trinity_apu.o: trinity_apu.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h trinity_apu.h \
 ../../cpu/cpuid.h
phenomx3_8650_toliman.o: phenomx3_8650_toliman.cpp ../../bochs.h \
 ../../config.h ../../osdep.h ../../bx_debug/debug.h ../../config.h \
 ../../osdep.h ../../gui/siminterface.h ../../cpudb.h \
 ../../gui/paramtree.h ../../memory/memory.h ../../pc_system.h \
 ../../gui/gui.h ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h \
 ../crregs.h ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h \
 ../icache.h ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h \
 ../fpu/status_w.h ../fpu/control_w.h ../xmm.h phenomx3_8650_toliman.h \
 ../../cpu/cpuid.h
turion64_tyler.o: turion64_tyler.cpp ../../bochs.h ../../config.h \
 ../../osdep.h ../../bx_debug/debug.h ../../config.h ../../osdep.h \
 ../../gui/siminterface.h ../../cpudb.h ../../gui/paramtree.h \
 ../../memory/memory.h ../../pc_system.h ../../gui/gui.h \
 ../../instrument/stubs/instrument.h ../cpu.h ../access.h ../cpuid.h ../crregs.h \
 ../descriptor.h ../instr.h ../ia_opcodes.h ../lazy_flags.h ../icache.h \
 ../apic.h ../i387.h ../fpu/softfloat.h ../fpu/tag_w.h ../fpu/status_w.h \
 ../fpu/control_w.h ../xmm.h turion64_tyler.h ../../cpu/cpuid.h
